
		The SARACEN's Weapon Slots v2.0a

What this does is set up a matrix of weapon values to allow cycling through small
groups of weapons using a single key, eg both the Gauntlet and the Grappling Hook
on the 1 key. There is room in the code for up to 32 weapons (8 groups of 4), so
you shouldn't have any problems with space! ;-)

The original Quake III Arena weapons are, by default, grouped into pairs:

Slot 1 = Utility Weapons    = Gauntlet / Grappling Hook
Slot 2 = Lead Weapons       = Machinegun / Shotgun
Slot 3 = Explosive Weapons  = Grenade Launcher / Rocket Launcher
Slot 4 = Scientific Weapons = Lightning Gun / Railgun
Slot 5 = Energy Weapons     = Plasma Gun / BFG10K

Slots 6, 7 and 8 are currently empty. If you have more weapons you wish to add, they
can be added in anywhere there is a blank space (existing weapons can also be moved),
for example you may wish to put your Flamethrower in between the Lightning Gun and
the Railgun in Slot 4, or you may wish to put it after the Rocket Launcher in Slot 3.
Be advised, however, that it will probably start behaving REALLY strangely if you put
the same weapon into more than one slot! (untested, but you know...logic, and all
that...)

You will notice, in the code, that there are nine slots. This is because all of our
work is done with slots 1-8, but we also want to keep track of which weapons we are
using in different slots - hence the zero'th slot.
The client-entity's playerentity field has a new array of nine int (slot[9]), which
tells us:
	- in cells 1 - 8 = what was our last selected weapon in that slot?
	- in cell 0      = what slot does our current weapon belong to?

This way, when we pick a slot that we've been to before, the game will automatically
pick the last weapon we used from that slot. We can also use a key to simply cycle the
weapons in our current slot (whichever that may be) by not specifying a slot.

Thus, our keybinds are as follows:

"slot 1" = cycle through the weapons in slot 1 (Utility Weapons)
"slot 2" = cycle through the weapons in slot 1 (Lead Weapons)
...
"slot 8" = cycle through the weapons in slot 8 (empty)
"slot" = cycle through the weapons in the same slot as our current weapon

The default configuration can be changed using the file slots.cfg. Full instructions
for doing this are in that file, so you may wish to read that.

====================================================================================

The following files contain the code.

cgame/cg_consolecmds.c
cgame/cg_event.c
cgame/cg_local.h
cgame/cg_playerstate.c
cgame/cg_snapshot.c
cgame/cg_weapons.c

As you can see, this is entirely client-side code.
Search for entries marked with:		// The SARACEN

====================================================================================

Added in version 1.0:
	Weapon Slots for selecting multiple weapons from a single key.
Added in version 2.0:
	Ability for clients to customise their weapon slots via slots.cfg file.
Added in version 2.0a:
	Phixed da bug which crashed your game if slots.cfg was longer than 1024 chars
(ummm...like the one I supplied...sorry, folks!). Also changed so that slots.cfg
only read on initial spawn in game, not every respawn.

Like it? Email thesaracen@ozemail.com.au or ICQ 59037191

====================================================================================

This is open source. Anyone who wishes to incorporate these Weapon Slots into their
own mods may do so, just please give me credit. Enjoy!
